number = eval(input())
s = 0
while number > 0:
    b = number%10
    s += b
    number//=10
print(s)